<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<title>商家年审</title>
		<link rel="stylesheet" href="__OEM__/css/iconfont.css" />
		<link rel="stylesheet" href="__OEM__/css/css.css" />
		<style>
			.empty{top: 40px;}
		</style>
	</head>

	<body>
		{include file="public/header" /}
		<div class="index_conbox">
			<div class="index_content clearfix">
				{include file="public/lefter" /}
				<div class="right">
					<div class="rigtop">
						<span class="title">商家年审</span>
					</div>
					<div class="indrig_con">
						
					<!--选项卡内容开始-->
					<form id="my_form" action="{:url('oem/count/agent_limited')}" method="post">
					<div class="zizh_con_1" style="margin-top: 10px;">
						<div class="chax_rowbox clearfix">
							<div class="shxx_row clearfix">
					            <div class="left">商家名称：</div>
					            <div class="right clearfix">
					                <input type="text" name="agent_name" id="agent_name" value="{$agent_name}" placeholder="商家名称" class="chax_input" />
					          	 </div>
					        </div>
				         	<div class="shxx_row chax_row clearfix">
					            <div class="left">手机号：</div>
					            <div class="right clearfix">
					                <input type="text" name="mobile" id="mobile" value="{$mobile}" placeholder="商家手机号" class="chax_input" />
				          	 	</div>
			      		  	</div>
						</div>
						<div class="chax_rowbox clearfix">
							<div class="shxx_row clearfix">
					            <div class="left">签约状态：</div>
					            <div class="right clearfix">
									<div id="htselect">
										<select name="is_state" style="width: 210px;height: 25px;">
											<option value="0">全部</option>
											<option value="1">已签约</option>
											<option value="2">未签约</option>
										</select>
									</div>
					            </div>
					        </div>
					         <div class="shxx_row chax_row clearfix">
					            <div class="left"></div>
					            <div class="right clearfix">
					                
					          	 </div>
				      		  </div>
					        <button type="submit" onclick="return check_time()" class="htcxbtn">搜索</button>
						</div>
						</form>

						<div class="help_lisbox">
							<table class="zizh_table1">
								<thead>
									<tr class="text-c">
										<th style="width: 50px;">ID</th>
										<th style="width: 150px;">商家名</th>
										<th style="width: 100px;">市代</th>
										<th style="width: 100px;">省代</th>
										<th style="width: 100px;">帐号</th>
										<th style="width: 150px;">有效时间</th>
										<th style="width: 80px;">到期天数</th>
										<th style="width: 200px;">操作</th>
									</tr>
								</thead>
								<tbody>
									{volist name="list" id="vo" empty="$empty"}
									<tr class="text-c">
										<td>{$vo.id}</td>
										<td>{$vo.agent_name}</td>
										<td>{$vo.pname}</td>
										<td>{$vo.cname}</td>
										<td>{$vo.mobile}</td>
										<td>{$vo.effective_time}</td>
										<td>{$vo.jgtime}</td>
										<!--<td class="td-manage">
										<a title="" href="javascript:;" onclick="agent_gf('官方签约','{:url('accounts/agent_gf',['id'=>$vo.id])}','400','400')" class="ml-5">官方签约</a>
									</td>-->
										<td class="td-manage">
											<a title="查看资料" href="{:url('oem/index/qianyue_step5',['agent_id'=>$vo.id])}"  class="ml-5" style="text-decoration:none">查看资料</a>
											<a title="通过" href="javascript:;" onclick="limited_pass(this,{$vo.id})"  class="ml-5" >通过</a>
											<a title="删除" href="javascript:;" onclick="complain_del(this,{$vo.id},{$vo.status})" class="ml-5" style="text-decoration:none">
												{if $vo.status==1}
												冻结
												{else /}
												激活
												{/if}</a>
											</a>
										</td>
									</tr>
									{/volist}
								</tbody>
							</table>
							<div class="fenye" style="display: block;">
								{$list->render()}
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
		{include file="public/footer" /}
	</body>

</html>
	<script type="text/javascript">
		/*年审核通过*/
		function limited_pass(obj, id) {
			layer.confirm('确认审核通过吗？', {
				btn: ['确定', '取消'] //按钮
			}, function() {
				$.ajax({
					type: 'get',
					url: "{:url('count/limited_pass')}",
					dataType: 'json',
					data: {
						id: id
					},
					success: function(data) {
						if(data.code == 200) {
							layer.msg(data.msg, {
							  icon: 1,
							  time: 1000 //2秒关闭（如果不配置，默认是3秒）
							}, function(){
								location.href = "{:url('count/agent_limited')}";
							});
						} else {
							layer.msg(data.msg, {
								icon: 1,
								time: 1000
							});
						}
					},
					error: function(data) {
						console.log(data.msg);
					}
				});
			});
		}
		
		/*管理员-冻结*/
		function complain_del(obj, id) {
			layer.confirm('确认要冻结吗？', {
				btn: ['确定', '取消'] //按钮
			}, function() {
				$.ajax({
					type: 'get',
					url: "{:url('count/complain_frozen')}",
					dataType: 'json',
					data: {
						id: id
					},
					success: function(data) {
						if(data.code == 200) {
							layer.msg(data.msg, {
							  icon: 1,
							  time: 1000 //2秒关闭（如果不配置，默认是3秒）
							}, function(){
								location.href = "{:url('count/agent_limited')}";
							});
						} else {
							layer.msg(data.msg, {
								icon: 1,
								time: 1000
							});
						}
					},
					error: function(data) {
						console.log(data.msg);
					}
				});
			});
		}
	
		/*官方签约*/
		function agent_gf(title, url, w, h) {
			layer_show(title, url, w, h);
		}
		/*银行签约*/
		function agent_nh(title, url, w, h) {
			layer_show(title, url, w, h);
		}
	</script>
